home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
windownt
/
perlnt.zip
/
t
/
op
/
read.nt
< prev
next >
Wrap
Text File
|
1993-07-25
|
467b
|
21 lines
#!./perl
# $Header: read.t,v 4.0 91/03/20 01:54:16 lwall Locked $
print "1..4\n";
open(FOO,'op/read.nt') || open(FOO,'t/op/read.nt') || die "Can't open op.read";
seek(FOO,4,0);
$got = read(FOO,$buf,4);
print ($got == 4 ? "ok 1\n" : "not ok 1\n");
print ($buf eq "perl" ? "ok 2\n" : "not ok 2 :$buf:\n");
seek(FOO,20000,0);
$got = read(FOO,$buf,4);
print ($got == 0 ? "ok 3\n" : "not ok 3\n");
print ($buf eq "" ? "ok 4\n" : "not ok 4\n");